﻿using System.Collections.Generic;
using System.Linq;

namespace AMAP.ServiceInterfaces.Common
{
    public interface IRepositoryService<T> : IDatabaseService where T : class
    {
        IQueryable<T> GetAll();
        IQueryable<T> GetAllReadOnly();
        List<T> GetAllAsList();
        List<T> GetAllAsListReadOnly();
        T GetById(int id);
        T GetById(long id);
        T GetById(string id);
        void Add(T entity);
        void Update(T entity);
        void Delete(int id);
        void Delete(string id);
        void AddWithoutSaving(T entity);
        void UpdateWithoutSaving(T entity);
        void DeleteWithoutSaving(int id);
        void DeleteWithoutSaving(string id);
        T Create();
    }
}